@{block #content}

<div><a href="{link :Kernel:Logs:Overview:default}" class="button ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-carat-1-w floatLeft">&nbsp;</span> &nbsp;{!_"Back to Logs"}</a></div>

<h1>{$title}</h1>

<p><a href="{link Display: TRUE}" class="button ui-state-default ui-corner-all" title="{!_'Update performance log'}"><span>{!_"Update performance log"}</span></a></p>

<p>{!_"Log performance levels"}
<a href="{link Display:loglevel 10000}" class="button ui-state-default ui-corner-all" title="REQUEST"><span>REQUEST</span></a>,
<a href="{link Display:loglevel 20000}" class="button ui-state-default ui-corner-all" title="OVERVIEW"><span>OVERVIEW</span></a>
{!_"or"} <a href="{link Display:loglevel 30000}" class="button ui-state-default ui-corner-all" title="DETAILED"><span>DETAILED</span></a>.<br />
{if isset($logLevel)}{!_"Current log level is: %s.",$logLevel}{/if}
{if isset($logLevelError)}<br /><span class="error">{$logLevelError}</span>{/if}</p>

<p>{!_"Delete all performance hard logs older than"}
<a href="{link Display:delete 1}" class="button ui-state-default ui-corner-all" title="{!_'1 month'}"><span>{!_"1 month"}</span></a>,
<a href="{link Display:delete 3}" class="button ui-state-default ui-corner-all" title="{!_'3 months'}"><span>{!_"3 months"}</span></a>
{!_"or"} <a href="{link Display:delete 0}" class="button ui-state-default ui-corner-all" title="{!_'delete all'}"><span>{!_"delete all"}</span></a>.
<br />{!_"All statistics will remain intact"}
{!_"or"} <a href="{link Display:deletestatistics}" class="button ui-state-default ui-corner-all" title="{!_'delete all statistics'}"><span>{!_"delete all statistics"}</span></a>.
{if isset($deleteError)}<br /><span class="error">{$deleteError}</span>{/if}</p>

{if isset($processed)}
<p><strong>{!_"Number of newly proccessed logs: %s.",$processed}</strong></p>
{/if}

{if isset($deleted)}
<p><strong>{!_"Number of deleted logs: %s.",$deleted}<br />{!_"Statistics remain instact."}</strong></p>
{/if}

{if count($blocks) > 0}

<table class="smallerTable">
	<tr>
    	<th>{!_"Block"}</th>
    	<th>{!_"Average Time"}</th>
    	<th>{!_"Measurements Count"}</th>
    </tr>
    {foreach $blocks as $block => $value}
    <tr>
        <td style="text-align:left;" title="{$block}">{$block|substr:0,50}</td>
        <td style="text-align:left;">{$value["average"]}</td>
        <td>{$value["count"]}</td>
    </tr>
    {/foreach}
</table>

{else}
<p>{!_'No logs available.'} <a href="{link Display: TRUE}" class="button ui-state-default ui-corner-all" title="{!_'Update performance log'}"><span>{!_"Update performance log"}</span></a></p>
{/if}
